package com.fs.ibox_h.servie.impl;

import com.fs.ibox_h.dao.UserDao;
import com.fs.ibox_h.dao.withdrawalDao;
import com.fs.ibox_h.pojo.User;
import com.fs.ibox_h.servie.UserService;
import com.fs.ibox_h.util.BeanFactory;
import com.fs.ibox_h.vo.Page;
import com.fs.ibox_h.vo.UserCondition;
import com.fs.ibox_h.vo.UserVO;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao userDao = BeanFactory.createBean(UserDao.class);

    @Override
    public Page<User> selceByCondition(int currentPageInt, int pageSizeInt, UserCondition userCondition) {
        Page<User> page = new Page<>(currentPageInt,pageSizeInt);
        page.setCount(userDao.count(userCondition));
        page.setRecords(userDao.selectByCnameState(currentPageInt,pageSizeInt,userCondition));
        return page;
    }
}
